$(function () {
  CompletionRat(RatData);
  DeclareTrend();
  CollectionGood();
  CollectionBad();
  CitiesInit();
  EffAmount();
  EffTime();
});


var RatData = [
  {name: "外省企业", sb: "510", wsb: "490", type: 0},
  {name: "本省（除合肥）企业", sb: "680", wsb: "390", type: 1},
  {name: "合肥企业", sb: "500", wsb: "390", type: 2}
];

function CompletionRat(data) {
  var Elrat = $("#completionRat");
  let xData = [], sbData = [], wsbData = [], totalData = [];
  data.forEach(function (item) {
    xData.push(item.name);
    const percentage = parseInt(item.sb) / (parseInt(item.sb) + parseInt(item.wsb)).toFixed(2);
    sbData.push({value: percentage, type: item.type});
    wsbData.push({value: 1 - percentage, type: item.type});
    totalData.push({
      name: item.name,
      total: parseInt(item.sb) + parseInt(item.wsb),
      sb: item.sb,
      wsb: item.wsb,
      percentage: percentage
    })
  });
  let myChart = echarts.init(document.getElementById("completionRat"));
  myChart.setOption({
    grid: {
      left: 90,
      right: 40,
      top: 80,
      bottom: 60
    },
    tooltip: {
      trigger: "axis",
      axisPointer: {
        type: "none"
      },
      // formatter:"{c}"
      formatter: function (params) {
        // console.log(totalData[params.dataIndex].total)
        return totalData[params[0].dataIndex].name + "：共有" + totalData[params[0].dataIndex].total + "家企业，完成率" + (totalData[params[0].dataIndex].percentage * 100).toFixed(0) + "%" +
          "</br><span class='marker' style='background: #1665D8;'></span>" + "已申报企业 " + totalData[params[0].dataIndex].sb + " 家" +
          "</br><span class='marker' style='background: #F6F7F8;'></span>" + "已申报企业 " + totalData[params[0].dataIndex].wsb + " 家"
      }
    },
    legend: {
      data: ["申报完成率"],
      icon: "rect",
      selectedMode: false,
      itemHeight: 10,
      itemWidth: 10,
      left: 30,
      top: 24,
      textStyle: {
        padding: [0, 0, -3],
        fontSize: 15
      }
    },
    xAxis: {
      type: 'category',
      splitLine: {show: false},
      axisLine: {show: false},
      axisTick: {show: false},
      axisLabel: {
        show: true,
        interval: 0,
        margin: 10,
        textStyle: {
          color: "#000000",
          fontSize: 14,
        },
        formatter: function (value) {
          if (data.length < 4) {
            return value
          } else {
            if (value.length < 4) {
              return value
            }
            if (value.length < 6) {
              return value.slice(0, 2) + '\n' + value.slice(2, value.length)
            }
            if (value.length >= 6) {
              let result = '', index = 0;
              for (let i = 1; i < value.length; i++) {
                if (i % 3 === 0 && i !== value.length - 1) {
                  result += value.slice(index, i) + '\n';
                  index = i;
                }
                if (i === value.length - 1) {
                  result += value.slice(index, value.length) + '\n';
                }
              }
              return result
            }
          }
        }
      },
      data: xData
    },
    yAxis: {
      type: 'value',
      splitLine: {
        show: true,
        lineStyle: {
          color: "#EAEDF3",
          type: "dashed"
        }
      },
      axisLine: {show: false},
      axisTick: {show: false},
      axisLabel: {
        show: true,
        margin: 20,
        textStyle: {
          color: "#000000",
          fontSize: 14,
        },
        formatter: function (value) {
          return value * 100 + "%"
        }
      }
    },
    series: [{
      name: "申报完成率",
      type: "bar",
      barWidth: "45%",
      itemStyle: {
        color: "#1665D8",
        barBorderRadius: [4, 4, 0, 0]
      },
      label: {
        show: true,
        color: "#8EBBF2",
        position: "top",
        formatter: function (params) {
          return (params.value * 100).toFixed(0) + "%"
        }
      },
      data: sbData,
      stack: 1,
      z: 1
    },
      {
        type: "bar",
        barWidth: "45%",
        itemStyle: {
          color: "#F6F7F8",
          barBorderRadius: [4, 4, 0, 0],
          emphasis: {
            color: "#E8E8E8",
          }
        },
        data: wsbData,
        stack: 1,
        z: 0,
      }]
  });
  myChart.on('click', function (param) {
    if (param.data.type) {
      Elrat.find('.collection_btn').remove();
      Elrat.append('<a class="collection_btn" onclick="CompletionRat(RatData);ratDelete()" href="javascript:;">返回上一步</a>')
    }
    if (param.data.type == 0) {
    }
    if (param.data.type == 1) {

    }
    if (param.data.type == 2) {
      let data = [
        {name: "乌鲁木齐", sb: "51", wsb: "49"},
        {name: "哈密", sb: "39", wsb: "61"},
        {name: "吐鲁番", sb: "25", wsb: "75"},
        {name: "克拉玛依", sb: "52", wsb: "48"},
        {name: "昌吉", sb: "20", wsb: "80"},
        {name: "博尔塔拉", sb: "35", wsb: "65"},
        {name: "巴音郭音", sb: "51", wsb: "49"},
        {name: "阿克苏", sb: "39", wsb: "61"},
        {name: "伊犁", sb: "25", wsb: "75"},
        {name: "克孜勒苏柯尔克孜", sb: "52", wsb: "48"},
        {name: "塔城", sb: "20", wsb: "80"},
        {name: "喀什", sb: "35", wsb: "65"},
        {name: "和田", sb: "25", wsb: "75"},
        {name: "阿尔泰", sb: "52", wsb: "48"},
        {name: "自治区直辖县", sb: "20", wsb: "80"},
        {name: "疆外企业", sb: "35", wsb: "65"},
      ]
      CompletionRat(data)
    }
  });
  $(window).resize(myChart.resize);
  $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    myChart.resize();
  })
}

function ratDelete() {
  $("#completionRat").find('.collection_btn').remove();
}

function DeclareTrend() {
  let myChart = echarts.init(document.getElementById("declareTrend"));
  myChart.setOption({
    tooltip: {
      trigger: "axis",
      axisPointer: {
        type: "line",
        lineStyle: {
          color: "#D3E3FF"
        }
      },
      textStyle: {
        align: "center"
      },
      formatter: function (params) {
        return params[0].name + "年信用申报完成率<br/>" + (params[1].value * 100).toFixed(2) + "%" + "，同比率" + (params[0].value * 100).toFixed(2) + "%"
      }
    },
    legend: {
      data: ["同比率", "完成率"],
      icon: "circle",
      left: 30,
      top: 20,
      itemGap: 40,
      textStyle: {
        padding: [0, 0, -3],
        fontSize: 15
      }
    },
    grid: {
      left: 90,
      right: 40,
      top: 80,
      bottom: 60
    },
    xAxis: {
      type: 'category',
      boundaryGap: false,
      splitLine: {show: false},
      axisLine: {show: false},
      axisTick: {show: false},
      axisLabel: {
        show: true,
        interval: 0,
        margin: 10,
        textStyle: {
          color: "#000000",
          fontSize: 14,
        },
      },
      data: ["2015", "2016", "2017", "2018", "2019", "2020", "2021"]
    },
    yAxis: {
      type: 'value',
      splitLine: {
        show: true,
        lineStyle: {
          color: "#EAEDF3",
          type: "dashed"
        }
      },
      axisLine: {show: false},
      axisTick: {show: false},
      axisLabel: {
        show: true,
        margin: 20,
        textStyle: {
          color: "#000000",
          fontSize: 14,
        },
        formatter: function (value) {
          return value * 100 + "%"
        }
      },
      minInterval: 0.1
    },
    series: [{
      name: "完成率",
      type: "line",
      symbol: "circle",
      symbolSize: 8,
      lineStyle: {
        color: "#3BAD4B",
        type: "dashed"
      },
      itemStyle: {
        color: "#3BAD4B"
      },
      data: [0.12, 0.18, 0.08, 0.18, 0.12, 0.13, 0.11]
    },
      {
        name: "同比率",
        type: "line",
        symbol: "circle",
        symbolSize: 8,
        lineStyle: {
          color: "#2CA0F7"
        },
        itemStyle: {
          color: "#2CA0F7"
        },
        areaStyle: {
          color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
            offset: 1,
            color: "rgba(25, 145, 235, 0.3)"// 0% 处的颜色
          }, {
            offset: 0,
            color: "rgba(25, 145, 235, 0)" // 100% 处的颜色
          }], false)
        },
        data: [0.1, -0.12, 0.09, 0.14, 0.1, 0.14, 0.09]
      }]
  })
  $(window).resize(myChart.resize);
  $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    myChart.resize();
  })
}

function CollectionGood() {
  let myChart = echarts.init(document.getElementById("collectionGood"));
  const colors = ["#3BAD4B", "#EAECEE"];
  myChart.setOption({
    title: [{
      text: "全疆良好信用统计",
      left: 40,
      top: 24,
      textStyle: {
        color: "#3BAD4B",
        fontWeight: 500
      }
    }, {
      text: "{a|89%}\n{b|审核完成率}",
      left: 95,
      top: 175,
      textStyle: {
        rich: {
          a: {
            width: 100,
            align: "center",
            lineHeight: 40,
            fontSize: 30,
            fontWeight: 600,
          },
          b: {
            width: 100,
            align: "center",
            lineHeight: 20,
            fontSize: 16,
            fontWeight: 500,
          }
        }
      }
    }],
    legend: {
      orient: 'vertical',
      data: ["已审核", "未审核"],
      icon: "circle",
      left: " 55%",
      bottom: 80,
      formatter: function (name) {
        var data = myChart._model.option.series[0].data
        var index = 0, total = 0;
        data.forEach(function (item, i) {
          if (item.name === name) {
            index = i;
          }
        });
        return "{a|" + name + "}   " + "{b|" + data[index].value + "条}"

      },
      textStyle: {
        padding: [0, 0, -2],
        rich: {
          a: {
            fontSize: 14,
            lineHeight: 20
          },
          b: {
            fontSize: 16,
            lineHeight: 20,
            fontWeight: "bold",

          }
        }
      }
    },
    tooltip: {
      trigger: "item"
    },
    series: [{
      type: "pie",
      clockwise: false,
      radius: [70, 115],
      center: [150, 210],
      label: {
        show: false,
      },
      hoverAnimation: false,
      silent:true,
      itemStyle: {
        color: function (params) {
          return params.value == 0 ? "#EAECEE" : colors[params.dataIndex];
        },
        emphasis: {
          opacity:1,
        },
      },
      data: [
        {name: "已审核", value: 1000},
        {name: "未审核", value: 321}
      ]
    }]
  });
  console.log(myChart)
  $("#collectionGood").append('<div class="coll_all">' +
    '<div class="coll_all_total">1321条</div>' +
    '<div class="coll_all_text">全疆良好信用审核总数</div>' +
    '</div><a class="collection_btn" href="javascript:;">查看详情 →</a>');
  $(window).resize(myChart.resize);
  $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    myChart.resize();
  })
}

function CollectionBad() {
  let myChart = echarts.init(document.getElementById("collectionBad"));
  const colors = ["#E7492E", "#EAECEE"];
  myChart.setOption({
    title: [{
      text: "全疆不良信用统计",
      left: 40,
      top: 24,
      textStyle: {
        color: "#E7492E",
        fontWeight: 500
      }
    }, {
      text: "{a|64%}\n{b|审核完成率}",
      left: 95,
      top: 175,
      textStyle: {
        rich: {
          a: {
            width: 100,
            align: "center",
            lineHeight: 40,
            fontSize: 30,
            fontWeight: 600,
          },
          b: {
            width: 100,
            align: "center",
            lineHeight: 20,
            fontSize: 16,
            fontWeight: 500,
          }
        }
      }
    }],
    legend: {
      orient: 'vertical',
      data: ["已审核", "未审核"],
      icon: "circle",
      left: " 55%",
      bottom: 80,
      formatter: function (name) {
        var data = myChart._model.option.series[0].data
        var index = 0, total = 0;
        data.forEach(function (item, i) {
          if (item.name === name) {
            index = i;
          }
        });
        return "{a|" + name + "}   " + "{b|" + data[index].value + "条}"

      },
      textStyle: {
        padding: [0, 0, -2],
        rich: {
          a: {
            fontSize: 14,
            lineHeight: 20
          },
          b: {
            fontSize: 16,
            lineHeight: 20,
            fontWeight: "bold",

          }
        }
      }
    },
    tooltip: {
      trigger: "item"
    },
    series: [{
      type: "pie",
      clockwise: false,
      radius: [70, 115],
      center: [150, 210],
      label: {
        show: false,
      },
      hoverAnimation: false,
      itemStyle: {
        color: function (params) {
          return params.value == 0 ? "#EAECEE" : colors[params.dataIndex];
        },
      },
      data: [
        {name: "已审核", value: 20},
        {name: "未审核", value: 20}
      ]
    }]
  });
  $("#collectionBad").append('<div class="coll_all">' +
    '<div class="coll_all_total">1321条</div>' +
    '<div class="coll_all_text">全疆不良信用审核总数</div>' +
    '</div><a class="collection_btn" href="javascript:;">查看详情 →</a>');
  $(window).resize(myChart.resize);
  $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    myChart.resize();
  })
}

function CitiesInit() {
  var data = [
    {name: "乌鲁木齐", sb: "51", wsb: "49"},
    {name: "哈密", sb: "39", wsb: "61"},
    {name: "吐鲁番", sb: "25", wsb: "75"},
    {name: "克拉玛依", sb: "52", wsb: "48"},
    {name: "昌吉", sb: "20", wsb: "80"},
    {name: "博尔塔拉", sb: "35", wsb: "65"},
    {name: "巴音郭音", sb: "51", wsb: "49"},
    {name: "阿克苏", sb: "39", wsb: "61"},
    {name: "伊犁", sb: "25", wsb: "75"},
    {name: "克孜勒苏柯尔克孜", sb: "52", wsb: "48"},
    {name: "塔城", sb: "20", wsb: "80"},
    {name: "喀什", sb: "35", wsb: "65"},
    {name: "和田", sb: "25", wsb: "75"},
    {name: "阿尔泰", sb: "52", wsb: "48"},
    {name: "自治区直辖县", sb: "20", wsb: "80"},
    {name: "疆外企业", sb: "35", wsb: "65"},
  ];
  let xData = [], sbData = [], wsbData = [], totalData = [];
  data.forEach(function (item) {
    xData.push(item.name);
    const percentage = parseInt(item.sb) / (parseInt(item.sb) + parseInt(item.wsb)).toFixed(2);
    sbData.push(percentage);
    wsbData.push(1 - percentage);
    totalData.push({
      name: item.name,
      total: parseInt(item.sb) + parseInt(item.wsb),
      sb: item.sb,
      wsb: item.wsb,
      percentage: percentage
    })
  });
  let myChart = echarts.init(document.getElementById("Cities"));
  myChart.setOption({
    grid: {
      left: 90,
      right: 40,
      top: 80,
      bottom: 60
    },
    legend: {
      data: ["审核完成率"],
      icon: "circle",
      selectedMode: false,
      itemHeight: 10,
      itemWidth: 10,
      left: 30,
      top: 24,
      textStyle: {
        padding: [0, 0, -3],
        fontSize: 15
      }
    },
    tooltip: {
      trigger: "axis",
      axisPointer: {
        type: "none"
      },
      // formatter:"{c}"
      formatter: function (params) {
        // console.log(totalData[params.dataIndex].total)
        return totalData[params[0].dataIndex].name + "：共有" + totalData[params[0].dataIndex].total + "家企业，完成率" + totalData[params[0].dataIndex].percentage * 100 + "%" +
          "</br><span class='marker' style='background: #3BAD4B;border-radius: 10px !important;'></span>" + "已申报企业 " + totalData[params[0].dataIndex].sb + " 家" +
          "</br><span class='marker' style='background: #F6F7F8;border-radius: 10px !important;'></span>" + "已申报企业 " + totalData[params[0].dataIndex].wsb + " 家"
      }
    },
    xAxis: {
      type: 'category',
      splitLine: {show: false},
      axisLine: {show: false},
      axisTick: {show: false},
      axisLabel: {
        show: true,
        interval: 0,
        margin: 10,
        textStyle: {
          color: "#000000",
          fontSize: 14,
        },
        formatter: function (value) {
          if (value.length < 4) {
            return value
          }
          if (value.length < 6) {
            return value.slice(0, 2) + '\n' + value.slice(2, value.length)
          }
          if (value.length >= 6) {
            let result = '', index = 0;
            for (let i = 1; i < value.length; i++) {
              if (i % 3 === 0 && i !== value.length - 1) {
                result += value.slice(index, i) + '\n';
                index = i;
              }
              if (i === value.length - 1) {
                result += value.slice(index, value.length) + '\n';
              }
            }
            return result
          }
        }
      },
      data: xData
    },
    yAxis: {
      type: 'value',
      splitLine: {
        show: true,
        lineStyle: {
          color: "#EAEDF3",
          type: "dashed"
        }
      },
      axisLine: {show: false},
      axisTick: {show: false},
      axisLabel: {
        show: true,
        margin: 20,
        textStyle: {
          color: "#000000",
          fontSize: 14,
        },
        formatter: function (value) {
          return value * 100 + "%"
        }
      }
    },
    series: [{
      name: "审核完成率",
      type: "bar",
      barWidth: "45%",
      itemStyle: {
        color: "#3BAD4B",
        barBorderRadius: [4, 4, 0, 0]
      },
      label: {
        show: true,
        color: "#92D29B",
        position: "top",
        formatter: function (params) {
          return params.value * 100 + "%"
        }
      },
      data: sbData,
      stack: 1,
      z: 1
    },
      {
        type: "bar",
        barWidth: "45%",
        itemStyle: {
          color: "#F6F7F8",
          barBorderRadius: [4, 4, 0, 0],
          emphasis: {
            color: "#E8E8E8",
          }
        },
        data: wsbData,
        stack: 1,
        z: 0,
      }]
  })
  $(window).resize(myChart.resize);
  $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    myChart.resize();
  })
}

function EffAmount() {
  let data = [
    {name: "1月", ysh: "120", dtj: "70"},
    {name: "2月", ysh: "110", dtj: "90"},
    {name: "3月", ysh: "100", dtj: "70"},
    {name: "4月", ysh: "79", dtj: "110"},
    {name: "5月", ysh: "120", dtj: "70"},
    {name: "6月", ysh: "110", dtj: "90"},
    {name: "7月", ysh: "100", dtj: "70"},
    {name: "8月", ysh: "79", dtj: "110"},
    {name: "9月", ysh: "79", dtj: "110"},
    {name: "10月", ysh: "110", dtj: "90"},
    {name: "11月", ysh: "79", dtj: "110"},
    {name: "12月", ysh: "100", dtj: "70"}
  ];
  let totalData = [], xData = [], examData = [], submitData = [];
  data.forEach(function (item) {
    totalData.push(parseInt(item.ysh) + parseInt(item.dtj));
    xData.push(item.name);
    examData.push(item.ysh);
    submitData.push(item.dtj);
  });
  let myChart = echarts.init(document.getElementById("effAmount"));
  myChart.setOption({
    title: {
      text: "审核数",
      left: 22,
      top: 24,
      textStyle: {
        fontSize: 15,
        color: "#000000"
      }
    },
    tooltip: {
      trigger: "axis",
      axisPointer: {
        type: "none"
      },
      textStyle: {
        align: "center"
      },
      formatter: function (params) {
        return params[0].name + "提交待审核数" + params[1].value + "件，<br/>已审核" + params[0].value + "件"
      }
    },
    legend: {
      data: ["已审核数", "提交待审核数"],
      left: 90,
      top: 24,
      icon: "circle",
      itemWidth: 10,
      itemHeight: 10,
      itemGap: 25,
      textStyle: {
        padding: [0, 0, -2],
        fontSize: 15,
        color: "#333333"
      }
    },
    grid: {
      left: 60,
      right: 30,
      top: 80,
      bottom: 40
    },
    xAxis: {
      splitLine: {
        show: false
      },
      axisLine: {
        show: true,
        lineStyle: {
          color: "#EAEDF3"
        }
      },
      axisLabel: {
        show: true,
        margin: 12,
        interval: 0,
        textStyle: {
          color: "#BABBC0",
          fontSize: 12,
        }
      },
      axisTick: {
        show: false
      },
      data: xData,
    },
    yAxis: {
      type: "value",
      boundaryGap: [0, "5%"],
      axisLine: {
        show: true,
        lineStyle: {
          color: "#EAEDF3"
        }
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        textStyle: {
          color: "#BABBC0",
          fontSize: 12
        }
      },
      splitNumber: 3,
      splitLine: {
        show: true,
        lineStyle: {
          type: "dashed",
          color: "#EAEDF3"
        }
      }
    },
    series: [{
      name: "已审核数",
      type: "bar",
      barWidth: 20,
      itemStyle: {
        color: "#40A1FD",
        emphasis: {
          color: "#40A1FD",
        }
      },
      label: {
        show: false,
      },
      data: examData,
      stack: 1
    }, {
      name: "提交待审核数",
      type: "bar",
      barWidth: 20,
      itemStyle: {
        color: "#EAECEE",
        emphasis: {
          color: "#EAECEE",
        }
      },
      label: {
        show: false,
      },
      data: submitData,
      stack: 1
    }, {
      // 分隔
      type: "pictorialBar",
      silent: true,
      itemStyle: {
        normal: {
          color: "#FFFFFF"
        }
      },
      symbolRepeat: "fixed",
      symbolMargin: 3,
      symbol: "rect",
      symbolClip: true,
      symbolSize: [20, 2],
      symbolPosition: "start",
      symbolOffset: [0, 3],
      data: totalData,
      z: 2,
      animationEasing: "elasticOut"
    }]
  });
  $(window).resize(myChart.resize);
  $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    myChart.resize();
  })
}

function EffTime() {
  let myChart = echarts.init(document.getElementById("effTime"));
  myChart.setOption({
    tooltip: {
      trigger: "axis",
      axisPointer: {
        type: "line",
        lineStyle: {
          color: "#D3E3FF"
        }
      },
      formatter: function (params) {
        return params[0].name + "平均审核时间" + params[0].value + "天"
      }
    },
    title: {
      text: "平均审核时间",
      left: 22,
      top: 24,
      textStyle: {
        fontSize: 15,
        color: "#000000"
      }
    },
    grid: {
      left: 65,
      right: 30,
      top: 80,
      bottom: 40
    },
    xAxis: {
      value: "category",
      boundaryGap: false,
      splitLine: {
        show: false
      },
      axisLine: {
        show: true,
        lineStyle: {
          color: "#EAEDF3"
        }
      },
      axisLabel: {
        show: true,
        margin: 12,
        interval: 0,
        textStyle: {
          color: "#BABBC0",
          fontSize: 12,
        }
      },
      axisTick: {
        show: false
      },
      data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
    },
    yAxis: {
      type: "value",
      boundaryGap: [0, "5%"],
      axisLine: {
        show: true,
        lineStyle: {
          color: "#EAEDF3"
        }
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        textStyle: {
          color: "#BABBC0",
          fontSize: 12
        },
        formatter: "{value}天"
      },
      splitNumber: 4,
      splitLine: {
        show: true,
        lineStyle: {
          type: "dashed",
          color: "#EAEDF3"
        }
      }
    },
    series: [{
      type: "line",
      symbol: "circle",
      symbolSize: 8,
      itemStyle: {
        color: "#1665D8"
      },
      lineStyle: {
        color: "#1665D8"
      },
      areaStyle: {
        color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
          offset: 1,
          color: "rgba(38, 128, 235, 0.05)"
        }, {
          offset: 0.1,
          color: "#FFFFFF"
        }])
      },
      data: [0.4, 0.2, 0.1, 1, 0.5, 0.6, 0.4, 0.2, 0.1, 1, 0.5, 0.6]
    }]
  });
  $(window).resize(myChart.resize);
  $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    myChart.resize();
  })
}



